package jun.empdepmanagersystem02.exception;


import jun.empdepmanagersystem02.pojo.Result;
import com.qiniu.common.QiniuException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionHandle {


    @ExceptionHandler(value = QiniuException.class)
    public Result qiniuyunException(QiniuException e) {
        e.printStackTrace();
        return Result.error("头像上传失败");
    }
    @ExceptionHandler(value = Exception.class)
    public Result handleException(Exception e) {
        e.printStackTrace();
        return Result.error("系统内部错误");
    }




}
